<?php
// Make sure _PATH_ is defined, otherwise when we pull in the config
// file it will have no idea where to find our directories
use Fox\Ressources\Icon;
if (!defined('_PATH_')) {define('_PATH_',dirname(__FILE__));}

// Constants Files
require_once(_PATH_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'const.php');

// Autoload
require_once _PATH_TO_FRAMEWORK_.'includes'.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'Fox.php';
Fox::instance()->initialize();
Fox::instance()->bootstrap(array(
	_BOOTSTRAP_CORE_CACHE_DIRECTORY_.'application.cache.php',
	_BOOTSTRAP_CORE_CACHE_DIRECTORY_.'basic-ui.cache.php')
);
Fox::instance()->register('Hive',Fox::MODE_NAMESPACE);

Fox\BundleManager::instance()->register(_CORE_PATH_.'bundles'.DIRECTORY_SEPARATOR.'Documents');
Fox\BundleManager::instance()->register(_CORE_PATH_.'bundles'.DIRECTORY_SEPARATOR.'Contact');
Fox\BundleManager::instance()->register(_CORE_PATH_.'bundles'.DIRECTORY_SEPARATOR.'Sales');
//Fox\BundleManager::instance()->register(_BUNDLES_.'Recruitment');
// Used ressources
use Fox\Ressources\Script,Fox\Ressources\Style,Fox\Ressources\Collection;
Fox\Ressources::instance()->register(
	new Style(_CORE_ASSETS_.'css/smoothness/jquery-ui-1.10.0.custom.min.css'),
	new Style(_CORE_ASSETS_.'css/bootstrap.min.css'),
	new Style(_CORE_ASSETS_.'css/standard.css'),
	new Style(_CORE_ASSETS_.'css/grid.css'),
	new Style(_CORE_ASSETS_.'css/buttons.css'),
	new Style(_ASSETS_.'css/style.css'),
	new Icon(_ASSETS_.'css/images/icons/iPhoneIcon_Big.png',null,null,false,array(
		Icon::PARAM_REL => Icon::APPLE_TOUCH,
		Icon::PARAM_SIZES => '118x120'
	)),
	new Icon(_ASSETS_.'css/images/icons/iPhoneIcon_Medium.png',null,null,false,array(
		Icon::PARAM_REL => Icon::APPLE_TOUCH,
		Icon::PARAM_SIZES => '74x76'
	)),
	new Icon(_ASSETS_.'css/images/icons/iPhoneIcon_Small.png',null,null,false,array(
		Icon::PARAM_REL => Icon::APPLE_TOUCH,
		Icon::PARAM_SIZES => '59x60'
	)),
	new Icon(_ASSETS_.'css/images/icons/Logo_mini.png',null,null,false,array(
		Icon::PARAM_REL => Icon::SHORT_CUT_ICON,
	)),
	// Javascript Custom
	new Collection('jquery',array(
		'jquery.js',
		'jquery-metadata.js',
		'jquery.hashtable-2.1.js',
		'jquery-ui-1.10.0.custom.min.js',
		'jquery.numberformatter-1.2.3.min.js',
		'i18next-1.6.0.min.js'
		),_CORE_ASSETS_.'js/jquery/min/',array(Collection::PARAM_CACHE => false)),
	new Collection('foxjs',array(
		'bootstrap.min.js',
		'jquery-fox.js',
		'fox/ui/tokeninput.js',
		'fox/ui/grid.js',
		'fox.js'
		),_CORE_ASSETS_.'js/',array(Collection::PARAM_CACHE => false)),
	new Script(_CORE_JAVAS_.'fox-html.js'),
	new Script(_CORE_JAVAS_.'fox-site.js'),
	new Script(_CORE_JAVAS_.'init.js'),
	new Script(_ASSETS_.'js/custom.js')
);
if(!Fox::instance()->isDev()) {
	set_time_limit(1500);
	ini_set('default_socket_timeout', 600);
	ini_set('gc_maxlifetime', 18000);// 5 hours
}